package com.eco.service.impl;

import com.eco.dao.ds3.SensorMapper;
import com.eco.entity.Sensor;
import com.eco.service.SensorService;
import com.github.pagehelper.PageHelper;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
/* loaded from: newfishway-1.0.0-SNAPSHOT.jar:BOOT-INF/classes/com/eco/service/impl/SensorServiceImpl.class */
public class SensorServiceImpl implements SensorService {

    @Autowired
    private SensorMapper scanMapper;

    @Override // com.eco.service.SensorService
    public int addByScan(Sensor scan) {
        return this.scanMapper.addByScan(scan);
    }

    @Override // com.eco.service.SensorService
    public List<Sensor> findByStime(String startDate, String endDate, String pageNum, int pageSize) {
        if (!StringUtils.isEmpty(pageNum)) {
            PageHelper.startPage(Integer.parseInt(pageNum), pageSize);
        }
        List<Sensor> scanList = this.scanMapper.findByStime(startDate, endDate, pageNum);
        return scanList;
    }

    @Override // com.eco.service.SensorService
    public int countByStime(String startDate, String endDate) {
        return this.scanMapper.countByStime(startDate, endDate);
    }
}